<?
session_start();

include_once("../../Misc.php");
include_once("../../classCol/UID.php");
include_once("../../classCol/classOracleDb.php");
include_once("../models/fetchers.php");

$srcDbGroupHdr = "GROUP_HDR";
$srcDbGroupDtl = "GROUP_DTL";
$srcDbPos      = "POS";
$srcDbDept     = "DEPARTMENT";

$Db         = new oracleDb;
$CLFetchers = new CLFetchers;

$Db->init($_SESSION["ORCLU"],
          $_SESSION["OPASS"],
          $_SESSION["SID"],
          _NO_COMMENT);

if($Db->connect()){

  $CLFetchers->fetchGroupPrivs($Db,
                               $_POST["srcPos"],
                               $_POST["srcDept"],
                               $srcDbGroupHdr,
                               $srcDbGroupDtl,
                               $srcDbPos,
                               $srcDbDept,
                               $nTimes,
                               $lstGroupPrivs);

  $Db->dc();

  $_SESSION["groupPrivs"] = $lstGroupPrivs;

  echo  $nTimes;
}else{

  echo  "0";
}

?>